<?php

class TimeController extends Project_Controller{
    
	public function timeAction() {
    	echo '<h1>Class Frogg_Time_Time</h1>';
        $time = new Frogg_Time_Time();
        echo '<ul>';
        echo '<li><b> static secondsFromDays($days):</b> '.Frogg_Time_Time::secondsFromDays(1).'</li>';
        echo '<li><b> static secondsFromHours($hours):</b> '.Frogg_Time_Time::secondsFromHours(1).'</li>';
        echo '<li><b> static secondsFromMinutes($minutes):</b> '.Frogg_Time_Time::secondsFromMinutes(1).'</li>';
        echo '</ul>';
        
        echo '<ul>';
        echo '<li><b> public __construct():</b> $time = new Frogg_Time_Time(\'2010-05-10 17:52:00\');</li>';
        echo '<li><b> public __construct():</b> $time = new Frogg_Time_Time(1273524720);</li>';
        echo '<li><b> public __construct():</b> $time = new Frogg_Time_Time();</li>';
        echo '<li><b> public __toString():</b> '.$time.'</li>';
        echo '<li><b> public getUnixTstamp():</b> '.$time->getUnixTstamp().'</li>';
        echo '<li><b> public getTstamp():</b> '.$time->getTstamp().'</li>';
        echo '<li><b> public add($seconds):</b> '.$time->add(1).'</li>';
        echo '<li><b> public sub($seconds):</b> '.$time->subtract(1).'</li>';
        echo '<li><b> public format($format):</b> '.$time->format('l, d M Y').'</li>';
        echo '</ul>';
        
        echo '<ul>';
        echo '<li><b> public diff($time_in_seconds):</b> '.$time->diff(1330695733).'</li>';
        echo '<li><b> public diff($timestamp):</b> '.$time->diff('2010-01-10 17:52:00').'</li>';
        echo '</ul>';
        
        
        $date_interval = $time->diff(1330695733);
        $date_interval_2 = $time->diff('2010-01-10 17:52:00');
         
        echo '<h1>Class Frogg_Time_DateInterval</h1>';
        
        $date_interval = new Frogg_Time_DateInterval(50000000);
        
        echo '<ul>';
        echo '<li><b> static secondsFromDays($days):</b> '.Frogg_Time_Time::secondsFromDays(1).'</li>';
        echo '<li><b> static secondsFromHours($hours):</b> '.Frogg_Time_Time::secondsFromHours(1).'</li>';
        echo '<li><b> static secondsFromMinutes($minutes):</b> '.Frogg_Time_Time::secondsFromMinutes(1).'</li>';
        echo '</ul>';
        
        echo '<ul>';
        echo '<li><b> Frogg_Time::diff($time):</b> $date_interval = $time->diff($time);</li>';
        echo '<li><b> public __construct():</b> $date_interval = new Frogg_Time_DateInterval(50000000);</li>';
        echo '<li><b> public __toString():</b> '.$date_interval.'</li>';
        echo '<li><b> public toSeconds():</b> '.$date_interval->toSeconds().'</li>';
        echo '<li><b> public toMinutes():</b> '.$date_interval->toMinutes().'</li>';
        echo '<li><b> public toHours():</b> '.$date_interval->toHours().'</li>';
        echo '<li><b> public toDays():</b> '.$date_interval->toDays().'</li>';
        echo '<li><b> public toMonths():</b> '.$date_interval->toMonths().'</li>';
        echo '<li><b> public toYears():</b> '.$date_interval->toYears().'</li>';
        echo '</ul>';
        die;
    }
}